home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
FGFADE11.ZIP
/
FADE.DOC
< prev
next >
Wrap
Text File
|
1995-02-13
|
3KB
|
62 lines
FADE version 1.1
Ted Gruber Software Voice: (702) 735-1980
PO Box 13408 FAX: (702) 735-4603
Las Vegas, NV 89112 BBS: (702) 796-7134
CIS: 72000,1642
------------------------------------------------------------------------------
FADE: Performing palette fades with Fastgraph
------------------------------------------------------------------------------
The FADE program shows how to perform 256-color palette fades with Fastgraph
4.0 or Fastgraph/Light 4.0. The program has two functions, fadein() and
fadeout(), that perform the fades. FADE uses these functions to make three
256-color images appear and disappear.
The fadein() function makes an image appear by gradually changing its colors
from all black (i.e., invisible) to its original colors. This function uses
Fastgraph's fg_pcxpal() function to retrieve the image's original colors from
the PCX file header. After this, fadein() sets all the video DAC regsiters to
zero, which makes every color black, and then displays the PCX image using the
current color values (instead of those stored in the PCX file's palette). The
color values are increased as needed in a loop until they reach their original
values.
The fadeout() makes an image disappear by gradually changing its original
colors to black. This function is conceptually much simpler than the companion
fadein() function because the target color values are all zero. The color
values are simply decreased in a loop until they all reach zero.
The files in FGFADE11.ZIP are:
FADE.DOC this file
FADE.EXE executable program (created with Turbo Pascal 6.0)
FADE.BAS BASIC source code
FADE.C C source code
FADE.FOR FORTRAN source code
FADE.PAS Borland/Turbo Pascal source code
BALLOONS.PCX PCX image files used by FADE.EXE
MOUSE.PCX
TOMMY.PCX
If you want to re-link the FADE source code, you must have Fastgraph or
Fastgraph/Light. Compilation and linking commands are provided in comments at
the beginning of each source code file. You may use this source code (or
modified versions of it) without charge in your Fastgraph and Fastgraph/Light
applications.
You may modify this source code any way you want, but please do not distribute
it in a modified form.
The fadein() and fadeout() functions are based on code originally written by
John Wagner, author of the IMPROCES image processing utility (IMPROCES is
available from our technical support BBS).
Fastgraph (tm) and Fastgraph/Light (tm) are graphics libraries published by
Ted Gruber Software. For more info, please call, write, or FAX. You can
download the latest evaluation version of Fastgraph/Light from DDBBS at (702)
796-7134, or from our internet ftp site (ftp.accessnv.com).